package com.neusoft.elmboot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.neusoft.elmboot.po.dto.WalletInfoDTO;
import com.neusoft.elmboot.po.vo.WalletTransactionVO;
import com.neusoft.elmboot.po.wallet.VirtualWallet;
//import com.neusoft.elmboot.po.wallet.WalletTransaction;
import io.swagger.v3.oas.annotations.Operation;

import java.math.BigDecimal;
import java.util.List;

public interface WalletService extends IService<VirtualWallet> {

    @Operation(summary = "初始化，创建虚拟钱包")
    Integer init(String walletId, String payPwd) throws Exception;

    @Operation(summary = "批量设置VIP")
    void setVIP(List<String> walletIdList) throws Exception;

    @Operation(summary = "设置透支额度")
    void setOverdraftAmount(String walletId, BigDecimal amount) throws Exception;

    @Operation(summary = "获取钱包信息")
    VirtualWallet getInfo(String walletId) throws Exception;

    @Operation(summary = "获取钱包信息（DTO格式）")
    WalletInfoDTO getWalletInfo(String walletId) throws Exception;

    @Operation(summary = "获取交易流水")
    List<WalletTransactionVO> getTransInfo(String walletId, Integer index) throws Exception;

    @Operation(summary = "充值")
    void recharge(String walletId, BigDecimal amount) throws Exception;

    @Operation(summary = "还款")
    void repay(String walletId, BigDecimal amount) throws Exception;

    @Operation(summary = "借贷")
    void borrow(String walletId, BigDecimal amount) throws Exception;

    @Operation(summary = "提现")
    BigDecimal withdraw(String walletId, String payPwd, BigDecimal amount) throws Exception;

    @Operation(summary = "支付")
    String pay(String fromWalletId, String toWalletId, String payPwd, BigDecimal amount) throws Exception;

    @Operation(summary = "确认支付（即解冻）")
    void confirm(String transId) throws Exception;

}
